﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight.Command;
using PocketBook.UI.View;

namespace PocketBook.UI.ViewModel.Dialogs
{
    public class BaseDialogViewModel : WorkspaceViewModel
    {
        private PocketBookDialog _window;

        #region Constructor

        public BaseDialogViewModel(PocketBookDialog window)
        {
            _window = window;
        }

        #endregion

        #region CloseCommand

        private RelayCommand _closeWinow;
        public RelayCommand CloseWinow
        {
            get
            {
                if (_closeWinow == null)
                {
                    _closeWinow = new RelayCommand(() =>
                    {
                        _window.Close();
                    });
                }
                return _closeWinow;
            }
        }

        #endregion
    }
}
